This invention relates to the manipulation of electronic files used to visually display images produced by a control associated with a heating, ventilating, and air conditioning system.
The amount of content that needs to be displayed by a control associated with today""s heating, ventilating, and air conditioning systems is increasing rapidly. This is occurring while at the same time there is an emphasis on cutting the costs of electronic components used in such embedded controls. In particular, the amount of content to be displayed impacts the amount of memory needed in these controls.
The present invention provides a set of processes for compressing and decompressing bitmapped picture files. The files preferably contain information to be displayed by a control associated with a heating, ventilating, and air conditioning system (hereinafter referred to as an HVAC system).
The process for compressing data begins with an examination of the first bitmapped pixel in a bitmapped file that is to be compressed. A programmed processor, either within the control or separate therefrom, counts the number of consecutive pixels having the same state as the first pixel. This number of consecutive pixels is used to generate a numerical representation of the counted number of pixels. The processor continues to analyze successive numbers of pixels of particular binary states and generating numerical representations as to the number of so counted pixels until the last pixel of a bitmapped picture file data is analyzed. The resulting compressed file consists of the value of the first pixel followed by a number of bytes containing a numerical representation of the number of pixels having binary values equal to the first pixel followed by further numbers of bytes having numerical representations of the number of pixels having first one binary value and then the other. This compressed file is stored in the memory of the control associated with the HVAC system.
The stored file is read from memory when it is to be displayed. The reading and decompressing of the stored file is the reverse of the compression of the file. In particular, the value of the first pixel is noted. A number of further bytes of information are thereafter analyzed to determine the appropriate number of pixels of the same value that are to be produced. The pixel value is changed and a number of further bytes of information are thereafter analyzed to determine the appropriate number of pixels of the changed pixel value that are to be produced. The changing of pixel value followed by an analysis of further bytes of information to determine the appropriate number of pixels of the changed pixel value to be produced is repeated until there are no more bytes of information to be analyzed.
In a preferred embodiment, the numerical representation is computed in the compression process by dividing a counted number, N, of consecutive pixels having a given binary value by a numerical constant. The numerical constant preferably has a mathematical relationship to the amount of bits in a byte of information. The resulting quotient is examined for having any remainder. If no remainder, then the resulting quotient having an integer xe2x80x9cnxe2x80x9d will be used by the processor to store xe2x80x9cnxe2x88x921xe2x80x9d bytes having a zero value followed by a byte containing the numerical constant. If on the other hand, there is a remainder xe2x80x9crxe2x80x9d, then the processor stores xe2x80x9cnxe2x80x9d bytes having a zero value followed by a byte of information containing the value of xe2x80x9crxe2x80x9d.